package com.ysu.zyw.modal.dto;

import org.hibernate.validator.constraints.Email;
import org.springframework.web.bind.annotation.RequestParam;

import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * Created by zhang_yao_wu1993 on 15/4/24.
 *
 * @author by Zerur
 */
public class BlogRegisterInformation {
    @Pattern(regexp = "^[A-Za-z0-9]{6,21}")
    private String username;
    @Pattern(regexp = "^[A-Za-z0-9]{6,21}")
    private String password;
    @Pattern(regexp = "^[A-Za-z0-9]{6,21}")
    private String password_confirm;
    @Pattern(regexp = "^.{2,21}")
    private String nickname;
    @Pattern(regexp = "^[0-9]{4,12}$")
    private String qq;
    @Email
    private String email;

    @Override
    public String toString() {
        return "UserRegisterDto{" +
                "username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", password_confirm='" + password_confirm + '\'' +
                ", nickname='" + nickname + '\'' +
                ", qq='" + qq + '\'' +
                ", email='" + email + '\'' +
                '}';
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPassword_confirm() {
        return password_confirm;
    }

    public void setPassword_confirm(String password_confirm) {
        this.password_confirm = password_confirm;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getQq() {
        return qq;
    }

    public void setQq(String qq) {
        this.qq = qq;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }
}
